home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part1 / 2338 < prev    next >
Encoding:
Internet Message Format  |  1996-08-06  |  704 b 

  1. Path: news.sprintlink.net!news
  2. From: Michael Benrud <mbenrud@hti.net>
  3. Newsgroups: comp.lang.c++
  4. Subject: problems w/ relational operator ==
  5. Date: Tue, 16 Jan 1996 23:06:26 -0600
  6. Organization: Hudson - Trinity, Inc. (713) 333-9558
  7. Message-ID: <30FC83D2.7B6A@hti.net>
  8. NNTP-Posting-Host: dialnet46.hti.net
  9. Mime-Version: 1.0
  10. Content-Type: text/plain; charset=us-ascii
  11. Content-Transfer-Encoding: 7bit
  12. X-Mailer: Mozilla 2.0b4 (Win95; I)
  13.  
  14. I am having some problems using the == operator. I am using BC 4.02.
  15. I have the following snipet of code:
  16.  
  17. double i;
  18.  
  19. if(i == 1.0)
  20.   Xinc = Xinc * 10;
  21.  
  22. The problem is that when i equals 1.0, the if statement never executes 
  23. Xinc = Xinc * 10. Any ideas? Thanks in advance.
  24.